package com.supermarket.user.mapper;


import com.supermarket.user.domain.User;
import com.supermarket.user.domain.vo.UserVo;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.factory.Mappers;

@Mapper
public interface UserMapStructMapper {
    UserMapStructMapper INSTANCE = Mappers.getMapper(UserMapStructMapper.class);

    @Mapping(target = "latestConsumptionTime", ignore = true)
    @Mapping(target = "latestConsumptionPrice", ignore = true)
    @Mapping(target = "accumulationConsumptionCount", ignore = true)
    @Mapping(target = "accumulationConsumptionPrice", ignore = true)
    UserVo toUserVo(User user);
}